package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbTransTipo generated by hbm2java
 */
@Entity
@Table(name = "TB_TRANS_TIPO", schema = "CATALOGOS")
public class TbTransTipo implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4506686354458340061L;
	/**
	 * 
	 */
 
	private String ctipoTrans;
	private String dtipoTrans;
	private String cusuario;
	private Date fhingreso;
	private Set<TbTransaccion> tbTransaccions = new HashSet<TbTransaccion>(0);

	public TbTransTipo() {
	}

	public TbTransTipo(String ctipoTrans, String dtipoTrans, Date fhingreso) {
		this.ctipoTrans = ctipoTrans;
		this.dtipoTrans = dtipoTrans;
		this.fhingreso = fhingreso;
	}

	public TbTransTipo(String ctipoTrans, String dtipoTrans, Date fhingreso,
			Set<TbTransaccion> tbTransaccions) {
		this.ctipoTrans = ctipoTrans;
		this.dtipoTrans = dtipoTrans;
		this.fhingreso = fhingreso;
		this.tbTransaccions = tbTransaccions;
	}

	@Id
	@Column(name = "C_TIPO_TRANS", unique = true, nullable = false, length = 1)
	public String getCtipoTrans() {
		return this.ctipoTrans;
	}

	public void setCtipoTrans(String ctipoTrans) {
		this.ctipoTrans = ctipoTrans;
	}

	@Column(name = "D_TIPO_TRANS", nullable = false, length = 40)
	public String getDtipoTrans() {
		return this.dtipoTrans;
	}

	public void setDtipoTrans(String dtipoTrans) {
		this.dtipoTrans = dtipoTrans;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbTransTipo")
	public Set<TbTransaccion> getTbTransaccions() {
		return this.tbTransaccions;
	}

	public void setTbTransaccions(Set<TbTransaccion> tbTransaccions) {
		this.tbTransaccions = tbTransaccions;
	}
	@Column(name = "C_USUARIO", nullable = true, length = 20)
	public String getCusuario() {
		return cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

}
